

package jetbrains.buildServer.server.graphql.util;

import graphql.ErrorClassification;
import graphql.GraphQLError;
import graphql.language.SourceLocation;
import java.util.Collections;
import java.util.List;
import org.jetbrains.annotations.NotNull;

public class OperationFailedGraphQLError implements GraphQLError {
  private final String myMessage;

  public OperationFailedGraphQLError(@NotNull String message) {
    myMessage = message;
  }

  @Override
  public String getMessage() {
    return myMessage;
  }

  @Override
  public List<SourceLocation> getLocations() {
    return Collections.emptyList();
  }

  @Override
  public ErrorClassification getErrorType() {
    return TeamCityGraphQLErrorType.OPERATION_FAILED;
  }
}